﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsForms
{
    public partial class TextBoxDemo : Form
    {
        public TextBoxDemo()
        {
            InitializeComponent();
        }

        private void textInput_TextChanged(object sender, EventArgs e)
        {
            this.labelCopy.Text = this.textInput.Text;
        }

        private void textHint_TextChanged(object sender, EventArgs e)
        {

        }

        private void labelCopy_Click(object sender, EventArgs e)
        {
            this.Text = textInput.Text;
        }

        private void textInput_Enter(object sender, EventArgs e)
        {
            this.textInput.Clear();
        }

        private void textHint_Leave(object sender, EventArgs e)
        {
            this.textHint.AppendText(this.textInput.Text + Environment.NewLine);
        }
    }
}
